1. Field of the Invention
The present invention relates to an image-forming device for forming images on a recording medium.
2. Description of Related Art
Image-forming devices for printing text, graphics, and the like on a recording medium, such as paper, are well known in the art. Such image-forming devices detect the edges of the paper with an optical sensor, and control movement of a print head mounted integrally on a carriage using the edges of the paper as reference positions, while ejecting ink droplets at desired positions on the paper.
Side edges of a recording medium can be detected by detecting the reflectance value while scanning the optical sensor provided on the carriage across the medium in the widthwise direction thereof (left-to-right direction) as proposed by Japanese unexamined patent application publication No. HEI-3-7371. That is, the left edge can be detected as a position at which the reflectance first increases and the right edge as a position at which the reflectance last decreases.
Generally, the optical sensor is provided integrally with the carriage (print head). Therefore, the print head can be moved to desired positions by controlling the print head with consideration for the distance between the optical sensor and the carriage (design value).
However, at times the distance between the optical sensor and the carriage differs from the design value due to mounting errors and the like. Such mounting errors can reduce the precision in detecting edges of the recording paper.
To resolve this problem, U.S. Pat. No. 5,255,987 has proposed an image-forming device that prints a mark at a prescribed position on the paper, that scans the location of the printed mark with an optical sensor, and that calculates an offset based on the difference between the carriage position stored in the image-forming device when printing the mark and the carriage position when the mark is read by the optical sensor.
An image-forming device with this construction can correct mounting errors by obtaining this offset value, which corresponds to the actual distance between the optical sensor and the carriage. Accordingly, the image-forming device can prevent a drop in detection accuracy when detecting the edges of the paper.